<template>
	<view class="container">
		<view class="course-detail">
			<image :src="avatar" mode="aspectFill" class="teacher-avatar"></image>
			<view class="teacher-name">
				<text>{{ name }}</text>
				<br />
				<text>hhhhhhhhhhh</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				avatar: '', // 图片
				name: '', // 名字
			};
		},
		onLoad(options) {
			// 接收从上一页传递的参数
			this.avatar = decodeURIComponent(options.avatar); // 解码头像 URL
			this.name = decodeURIComponent(options.name); // 解码名字
		}
	};
</script>

<style>
	.container {
		padding: 20px;
	}

	.course-detail {
		display: flex;
		align-items: center;
	}
	.teacher-avatar {
	  width: 90px;
	  height: 90px;
	  border-radius: 50%;
	  margin-bottom: 10px;
	}
	.teacher-name {
	  font-size: 20px;
	  font-weight: bold;
	  margin-left: 20px;
	}
</style>